package com.tool.btn;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.MouseEvent;
import java.util.Vector;

import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableModel;

import org.come.Jpanel.*;
import org.come.socket.Agreement;
import org.come.socket.SendMessageUntil;
import org.come.until.CutButtonImage;

import com.tool.tcpimg.RichLabel;
import com.tool.tcpimg.UIUtils;

public class TaoBaoBtn extends MoBanBtn {

    /**
     * 充值1 商城2 锦绣3 限购4 周卡5 月卡6 基金7 <br>
     * 珍品10, 技能11, 神兽12, 仙器13, 配饰14, 积分15 <br>
     * (多宝阁商城 -- 首页20 上一页21 下一页22 末页23)<br>
     * 欢送好礼30 冲击必备31 限时折扣32 <br>
     * (多宝阁充值 -- 首页40 上一页41 下一页42 末页43) <br>
     * (多宝阁限购 -- 首页50 上一页51 下一页52 末页53) <br>
     * 每日签到60 周/月卡领奖61 <br>
     * 自定义70
     */
    private int caozuo;
    private QuotaJpanel quotaJpanel;
    private DailyLoginJPanel dailyLoginJPanel;
    private SeventyTwoChangesJpanel seventyTwoChangesJpanel;

    private TaobaoCourtMainJpanel taobaoCourtMainJpanel;
    private ShopOnlineJpanel shopOnlineJpanel;
    //商城新增加
    private ShopHomePageJpanel shopHomePageJpanel;

    private ShopFlyJpanel shopFlyJpanel;

    //商城新增加
    public TaoBaoBtn(String iconpath, int type, String text, int caozuo) {
        super(iconpath, type);
        this.caozuo = caozuo;
        this.setText(text);

        if (caozuo > 9 && caozuo < 20) {
            setFont(UIUtils.TEXT_HY16);
            setForeground(Color.white);
        } else if (caozuo > 19 && caozuo < 24) {
            setFont(UIUtils.TEXT_FONT);
            setForeground(Color.white);
        } else if (caozuo > 23 && caozuo < 30) {
            setFont(UIUtils.TEXT_HY12);
            setForeground(Color.white);
        } else {
            setFont(UIUtils.TEXT_HY19);
            setForeground(UIUtils.COLOR_BTNXUANXIANGKA[0]);
        }

        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }

    public TaoBaoBtn(String iconpath, int type, String text, int caozuo, ShopOnlineJpanel shopOnlineJpanel) {
        super(iconpath, type);
        this.caozuo = caozuo;
        this.shopOnlineJpanel = shopOnlineJpanel;
        this.setText(text);
        if (caozuo > 19 && caozuo < 24) {
            setFont(UIUtils.TEXT_FONT);
            setForeground(Color.white);
        } else if (caozuo > 23 && caozuo < 30) {
            setFont(UIUtils.TEXT_HY12);
            setForeground(Color.white);
        } else {
            setFont(UIUtils.TEXT_HY19);
            setForeground(UIUtils.COLOR_BTNXUANXIANGKA[0]);
        }

        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }
    //商城新增加

    public TaoBaoBtn(String iconpath, int type, String text, int caozuo, ShopHomePageJpanel shopHomePageJpanel) {
        super(iconpath, type);
        this.caozuo = caozuo;
        this.shopHomePageJpanel = shopHomePageJpanel;
        this.setText(text);
        if (caozuo > 19 && caozuo < 24) {
            setFont(UIUtils.TEXT_FONT);
            setForeground(Color.white);
        } else if (caozuo > 23 && caozuo < 30) {
            setFont(UIUtils.TEXT_HY12);
            setForeground(Color.white);
        } else {
            setFont(UIUtils.TEXT_HY19);
            setForeground(UIUtils.COLOR_BTNXUANXIANGKA[0]);
        }

        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }


    public TaoBaoBtn(String iconpath, int type, String text, int caozuo, ShopFlyJpanel shopFlyJpanel) {
        super(iconpath, type);
        this.caozuo = caozuo;
        this.shopFlyJpanel = shopFlyJpanel;
        this.setText(text);
        if (caozuo > 19 && caozuo < 24) {
            setFont(UIUtils.TEXT_FONT);
            setForeground(Color.white);
        } else if (caozuo > 23 && caozuo < 30) {
            setFont(UIUtils.TEXT_HY12);
            setForeground(Color.white);
        } else {
            setFont(UIUtils.TEXT_HY19);
            setForeground(UIUtils.COLOR_BTNXUANXIANGKA[0]);
        }

        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }


    //商城新增加

    public TaoBaoBtn(String iconpath, int type, String text, int caozuo, TaobaoCourtMainJpanel taobaoCourtMainJpanel) {
        super(iconpath, type);
        this.caozuo = caozuo;
        this.taobaoCourtMainJpanel = taobaoCourtMainJpanel;
        this.setText(text);
        if (caozuo > 9 && caozuo < 20) {
            setFont(UIUtils.TEXT_HY16);
            setForeground(Color.white);
        } else if (caozuo > 19 && caozuo < 30) {
            setFont(UIUtils.TEXT_HY12);
            setForeground(Color.white);
        } else {
            setFont(UIUtils.TEXT_HY19);
            setForeground(UIUtils.COLOR_BTNXUANXIANGKA[0]);
        }

        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }

    public TaoBaoBtn(String iconpath, int type, String text, int caozuo, QuotaJpanel quotaJpanel) {
        super(iconpath, type);
        this.caozuo = caozuo;
        this.setText(text);
        this.quotaJpanel = quotaJpanel;
        if (caozuo > 9) {
            setFont(UIUtils.TEXT_HY16);
            setForeground(Color.white);
        } else {
            setFont(UIUtils.TEXT_HY19);
            setForeground(UIUtils.COLOR_BTNXUANXIANGKA[0]);
        }

        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }

    /**
     * 60-79
     */
    public TaoBaoBtn(String iconpath, int type, String text, int caozuo, DailyLoginJPanel dailyLoginJPanel) {
        super(iconpath, type);
        this.caozuo = caozuo;
        this.setText(text);
        this.dailyLoginJPanel = dailyLoginJPanel;
        if (caozuo > 59 && caozuo < 70) {
            setFont(UIUtils.TEXT_FONT1);
            setForeground(Color.black);
        } else if (caozuo > 69 && caozuo < 80) {
            setFont(UIUtils.TEXT_FONT2);
            setForeground(Color.white);
        } else {
            setFont(UIUtils.TEXT_HY19);
            setForeground(UIUtils.COLOR_BTNXUANXIANGKA[0]);
        }

        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }

    /**
     * 80-99
     */
    public TaoBaoBtn(String iconpath, int type, String text, int caozuo, SeventyTwoChangesJpanel seventyTwoChangesJpanel) {
        super(iconpath, type);
        this.caozuo = caozuo;
        this.setText(text);
        this.seventyTwoChangesJpanel = seventyTwoChangesJpanel;
        if (caozuo > 79 && caozuo < 90) {
            setFont(UIUtils.TEXT_FONT);
            setForeground(Color.white);
        } else {
            setFont(UIUtils.TEXT_HY14);
            // new
            // font=font.deriveFont(Font.BOLD);

        }

        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }

    @Override
    public void chooseyes() {
        // TODO Auto-generated method stub

    }

    @Override
    public void chooseno() {
        // TODO Auto-generated method stub

    }

    @Override
    public void nochoose(MouseEvent e) {
        try {
            switch (caozuo) {
                /** 7-17-HGC-start */
                case 1:
                case 2:
                case 4:
                case 3:
                case 6:
                case 7:
//                case 8:
                    int menuType = taobaoCourtMainJpanel.getTaobaoCourtCardJpanel().getMenuType();
                    TaobaoCourtCardJpanel taobaoCourtCardJpanel = taobaoCourtMainJpanel.getTaobaoCourtCardJpanel();
                    if (menuType != caozuo) {


                        //商城新增加

                        if (menuType == 1) {
                            taobaoCourtMainJpanel.getShopHomePage().setIcons(CutButtonImage.cuts("inkImg/number/b8/shouye.png"));
                        }
                        //商城新增加

                        else if (menuType == 2) {
                            taobaoCourtMainJpanel.getShopMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/zonghe.png"));
                        }
                        //商城新增加
                        else if (menuType == 4) {
                            taobaoCourtMainJpanel.getShopFlyBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/Fly.png"));
                        }
                        //商城新增加
                        else if (menuType == 3) {
                            taobaoCourtMainJpanel.getTaobaoMenuBtn()
                                    .setIcons(CutButtonImage.cuts("inkImg/number/b8/jinxiu.png"));
                        } else if (menuType == 6) {
                            taobaoCourtMainJpanel.getMonthCardBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/monthly.png"));
                        }

                        //新增加

                        //新增加
                        else if (menuType == 7) {
                            taobaoCourtMainJpanel.getVipMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/vip.png"));
                        }
                        else if (menuType == 8) {
                            taobaoCourtMainJpanel.getLiangCardBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/liang1.png"));
                        }
                        taobaoCourtMainJpanel.getTaobaoCourtCardJpanel().setMenuType(caozuo);
                        menuType = taobaoCourtMainJpanel.getTaobaoCourtCardJpanel().getMenuType();
                    }

                    //商城新增加

                    if (menuType == 1) {
                        taobaoCourtMainJpanel.getShopHomePage().setIcons(CutButtonImage.cuts("inkImg/number/b8/shouye1.png"));
                        taobaoCourtCardJpanel.getCardLayout().show(taobaoCourtCardJpanel, "shopHomePage");
                    }
                    //商城新增加


                    else if (menuType == 2) {
                        taobaoCourtMainJpanel.getShopMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/zonghe1.png"));
                        taobaoCourtCardJpanel.getCardLayout().show(taobaoCourtCardJpanel, "shopOnline");
                    }
                    //商城新增加
                    else if (menuType == 4) {
                        taobaoCourtMainJpanel.getShopFlyBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/Fly1.png"));
                        taobaoCourtCardJpanel.getCardLayout().show(taobaoCourtCardJpanel, "fly");
                    }
                    //商城新增加
                    else if (menuType == 3) {
                        taobaoCourtMainJpanel.getTaobaoMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/jinxiu1.png"));
                        taobaoCourtCardJpanel.getTaobaoCourtSplendidJpanel().showTaobao();
                        taobaoCourtCardJpanel.getCardLayout().show(taobaoCourtCardJpanel, "taobaoCourt");
                    } else if (menuType == 6) {
                        taobaoCourtMainJpanel.getMonthCardBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/monthly1.png"));
                        taobaoCourtCardJpanel.getMonthlyCardJpanel().changeTime();
                        taobaoCourtCardJpanel.getCardLayout().show(taobaoCourtCardJpanel, "monthCard");
                    }
                    //新增加

                    //新增加

                    else if (menuType == 7) {
                        taobaoCourtMainJpanel.getVipMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/vip1.png"));
                        taobaoCourtCardJpanel.getVipShopJpanel().getShop();
                        taobaoCourtCardJpanel.getCardLayout().show(taobaoCourtCardJpanel, "vipMenu");
                    }
                    else if (menuType == 8) {
                        taobaoCourtMainJpanel.getLiangCardBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/liang.png"));
                        String mes2 = Agreement.getAgreement().selllianghaoAgreement("SELLLIST");
                        SendMessageUntil.toServer(mes2);
                        taobaoCourtCardJpanel.getCardLayout().show(taobaoCourtCardJpanel, "liangCard");
                    }
                    break;
                case 10:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                    /** "珍品"-6, "技能"-7, "神兽"-8, "仙器"-9, "配饰"-10, "积分"-11  "技能书"-12  "珍品" -13 ""-14*/
                    int shopType = shopOnlineJpanel.getShopType();
                    if (shopType != (caozuo - 4)) {
                        if (shopType == 6) {
                            shopOnlineJpanel.getTreasureMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/material.png"));
                        } else if (shopType == 7) {
                            shopOnlineJpanel.getSkillMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnxq.png"));
                        } else if (shopType == 8) {
                            shopOnlineJpanel.getMythicalMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnzhs.png"));
                        } else if (shopType == 9) {
                            shopOnlineJpanel.getDeviceMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnlb.png"));
                        } else if (shopType == 10) {
                            shopOnlineJpanel.getBaldricMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnps.png"));
                        } else if (shopType == 11) {
                            shopOnlineJpanel.getIntegralMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnjf.png"));
                        } else if (shopType == 12) {
                            shopOnlineJpanel.getSkillBookMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnzp.png"));
                        }
                         else if (shopType == 18) {
                            shopOnlineJpanel.getQuestMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnjf.png"));
                         }
                        else if (shopType == 14) {
                            shopOnlineJpanel.getTrepanningMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnhz.png"));
                        }

                        shopType = caozuo - 4;
                        if (shopType == 6) {
                            shopOnlineJpanel.getTreasureMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/material1.png"));
                        } else if (shopType == 7) {
                            shopOnlineJpanel.getSkillMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnxq1.png"));
                        } else if (shopType == 8) {
                            shopOnlineJpanel.getMythicalMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnzhs1.png"));
                        } else if (shopType == 9) {
                            shopOnlineJpanel.getDeviceMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnlb1.png"));
                        } else if (shopType == 10) {
                            shopOnlineJpanel.getBaldricMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnps1.png"));
                        } else if (shopType == 11) {
                            shopOnlineJpanel.getIntegralMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnjf1.png"));
                        } else if (shopType == 12) {
                            shopOnlineJpanel.getSkillBookMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnzp1.png"));
                        }
                        else if (shopType == 18) {
                           shopOnlineJpanel.getQuestMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnjf1.png"));
                        }
                        else if (shopType == 14) {
                            shopOnlineJpanel.getTrepanningMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/btnhz1.png"));
                        }
                    }
                    shopOnlineJpanel.setNowPage(1);
                    shopOnlineJpanel.isShopGoods(caozuo - 4);
                    break;


                /** 7-17-HGC-end */
                case 20:
                    if (shopOnlineJpanel.getNowPage() <= 1) {
                        return;
                    }
                    shopOnlineJpanel.setNowPage(1);
                    shopOnlineJpanel.isShopGoods(shopOnlineJpanel.getShopType());
                    break;
                case 21:
                    if (shopOnlineJpanel.getNowPage() <= 1) {
                        return;
                    }
                    shopOnlineJpanel.setNowPage(shopOnlineJpanel.getNowPage() - 1);
                    shopOnlineJpanel.isShopGoods(shopOnlineJpanel.getShopType());
                    break;
                case 22:
                    if (shopOnlineJpanel.getNowPage() >= shopOnlineJpanel.getMaxPage()) {

                        return;
                    }
                    shopOnlineJpanel.setNowPage(shopOnlineJpanel.getNowPage() + 1);
                    shopOnlineJpanel.isShopGoods(shopOnlineJpanel.getShopType());
                    break;
                case 23:
                    if (shopOnlineJpanel.getNowPage() >= shopOnlineJpanel.getMaxPage()) {
                        return;
                    }
                    shopOnlineJpanel.setNowPage(shopOnlineJpanel.getMaxPage());
                    shopOnlineJpanel.isShopGoods(shopOnlineJpanel.getShopType());
                    break;

                //商城新增加

                /** 40-49-HGC-end */
                case 44:
                case 45:
                case 46:
                case 47:
                case 48:
                    /** "推荐"-6, "上新"-7, "折扣"-8*/
                    int shopType1 = shopHomePageJpanel.getShopType1();
                    if (shopType1 != (caozuo - 4)) {
                        if (shopType1 == 40) {
                            shopHomePageJpanel.getRecommendMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/hometj.png"));
                        } else if (shopType1 == 41) {
                            shopHomePageJpanel.getNewMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/homexp.png"));
                        } else if (shopType1 == 42) {
                            shopHomePageJpanel.getDiscountMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/homezk.png"));
                        } else if (shopType1 == 43) {
                            shopHomePageJpanel.getPharmaceuticalsMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/homeyp.png"));
                        } else if (shopType1 == 44) {
                            shopHomePageJpanel.getTreasureMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/homeljbj.png"));
                        }

                        shopType1 = caozuo - 4;
                        if (shopType1 == 40) {
                            shopHomePageJpanel.getRecommendMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/hometj1.png"));
                        } else if (shopType1 == 41) {
                            shopHomePageJpanel.getNewMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/homexp1.png"));
                        } else if (shopType1 == 42) {
                            shopHomePageJpanel.getDiscountMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/homezk1.png"));
                        } else if (shopType1 == 43) {
                            shopHomePageJpanel.getPharmaceuticalsMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/homeyp1.png"));
                        } else if (shopType1 == 44) {
                            shopHomePageJpanel.getTreasureMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/homeljbj1.png"));
                        }
                    }
                    shopHomePageJpanel.setNowPage(1);
                    shopHomePageJpanel.isShopGoods1(caozuo - 4);
                    break;


                case 50:
                    if (shopHomePageJpanel.getNowPage() <= 1) {
                        return;
                    }
                    shopHomePageJpanel.setNowPage(1);
                    shopHomePageJpanel.isShopGoods1(shopHomePageJpanel.getShopType1());
                    break;
                case 51:
                    if (shopHomePageJpanel.getNowPage() <= 1) {
                        return;
                    }
                    shopHomePageJpanel.setNowPage(shopHomePageJpanel.getNowPage() - 1);
                    shopHomePageJpanel.isShopGoods1(shopHomePageJpanel.getShopType1());
                    break;
                case 52:
                    if (shopHomePageJpanel.getNowPage() >= shopHomePageJpanel.getMaxPage()) {

                        return;
                    }
                    shopHomePageJpanel.setNowPage(shopHomePageJpanel.getNowPage() + 1);
                    shopHomePageJpanel.isShopGoods1(shopHomePageJpanel.getShopType1());
                    break;
                case 53:
                    if (shopHomePageJpanel.getNowPage() >= shopHomePageJpanel.getMaxPage()) {
                        return;
                    }
                    shopHomePageJpanel.setNowPage(shopHomePageJpanel.getMaxPage());
                    shopHomePageJpanel.isShopGoods1(shopHomePageJpanel.getShopType1());
                    break;
//商城飞行器新增加

                /** 70-79-HGC-end */
                case 74:
                case 75:
                    /** "飞行器"-6, "材料"-7*/
                    int shopType2 = shopFlyJpanel.getShopType2();
                    if (shopType2 != (caozuo - 4)) {
                        if (shopType2 == 70) {
                            shopFlyJpanel.getFlyMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/flymenu.png"));
                        } else if (shopType2 == 71) {
                            shopFlyJpanel.getFlyMaterialMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/material.png"));
                        }

                        shopType2 = caozuo - 4;
                        if (shopType2 == 70) {
                            shopFlyJpanel.getFlyMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/flymenu1.png"));
                        } else if (shopType2 == 71) {
                            shopFlyJpanel.getFlyMaterialMenuBtn().setIcons(CutButtonImage.cuts("inkImg/number/b8/material1.png"));
                        }
                    }
                    shopFlyJpanel.setNowPage(1);
                    shopFlyJpanel.isShopGoods1(caozuo - 4);
                    break;


                case 55:
                    if (shopFlyJpanel.getNowPage() <= 1) {
                        return;
                    }
                    shopFlyJpanel.setNowPage(1);
                    shopFlyJpanel.isShopGoods1(shopFlyJpanel.getShopType2());
                    break;
                case 56:
                    if (shopFlyJpanel.getNowPage() <= 1) {
                        return;
                    }
                    shopFlyJpanel.setNowPage(shopFlyJpanel.getNowPage() - 1);
                    shopFlyJpanel.isShopGoods1(shopFlyJpanel.getShopType2());
                    break;
                case 57:
                    if (shopFlyJpanel.getNowPage() >= shopFlyJpanel.getMaxPage()) {

                        return;
                    }
                    shopFlyJpanel.setNowPage(shopFlyJpanel.getNowPage() + 1);
                    shopFlyJpanel.isShopGoods1(shopFlyJpanel.getShopType2());
                    break;
                case 58:
                    if (shopFlyJpanel.getNowPage() >= shopFlyJpanel.getMaxPage()) {
                        return;
                    }
                    shopFlyJpanel.setNowPage(shopFlyJpanel.getMaxPage());
                    shopFlyJpanel.isShopGoods1(shopFlyJpanel.getShopType2());
                    break;

                //商城新增加

                /** 7-18-HGC-start */
                // case 30:
                // changeMenuBtnQuota();
                //
                // break;
                // case 31:
                // changeMenuBtnQuota();
                //
                // break;
                // case 32:
                // changeMenuBtnQuota();
                //
                // break;

                // 兑换好礼exchangeMenuBtn<br>
                // * 冲级必备levelMenuBtn<br>
                // * 显示折扣discountMenuBtn<br>
                case 30:
                    quotaJpanel.getExchangeMenuBtn().setIcons(
                            CutButtonImage.cuts("inkImg/hongmu/2/二级选项卡_商城_限购_赠送好礼_选中_w100,h78.png"));
                    quotaJpanel.getLevelMenuBtn().setIcons(
                            CutButtonImage.cuts("inkImg/hongmu/2/二级选项卡_商城_限购_冲级必备_未选中_w100,h78.png"));
                    quotaJpanel.getDiscountMenuBtn().setIcons(
                            CutButtonImage.cuts("inkImg/hongmu/2/二级选项卡_商城_限购_显示折扣_未选中_w100,h78.png"));

                    break;
                case 31:
                    quotaJpanel.getExchangeMenuBtn().setIcons(
                            CutButtonImage.cuts("inkImg/hongmu/2/二级选项卡_商城_限购_赠送好礼_未选中_w100,h78.png"));
                    quotaJpanel.getLevelMenuBtn().setIcons(
                            CutButtonImage.cuts("inkImg/hongmu/2/二级选项卡_商城_限购_冲级必备_选中_w100,h78.png"));
                    quotaJpanel.getDiscountMenuBtn().setIcons(
                            CutButtonImage.cuts("inkImg/hongmu/2/二级选项卡_商城_限购_显示折扣_未选中_w100,h78.png"));
                    break;
                case 32:
                    quotaJpanel.getExchangeMenuBtn().setIcons(
                            CutButtonImage.cuts("inkImg/hongmu/2/二级选项卡_商城_限购_赠送好礼_未选中_w100,h78.png"));
                    quotaJpanel.getLevelMenuBtn().setIcons(
                            CutButtonImage.cuts("inkImg/hongmu/2/二级选项卡_商城_限购_冲级必备_未选中_w100,h78.png"));
                    quotaJpanel.getDiscountMenuBtn().setIcons(
                            CutButtonImage.cuts("inkImg/hongmu/2/二级选项卡_商城_限购_显示折扣_选中_w100,h78.png"));
                    break;

                //商城新增加

                //商城新增加

                /** 7-18-HGC-end */
                case 60:
                    changeMenuBtnDailyLogin();
                    break;
                case 61:
                    changeMenuBtnDailyLogin();
                    break;
                case 80:
                    changeMenuBtnSeventyTwoChanges();
                    break;
                case 81:
                    changeMenuBtnSeventyTwoChanges();
                    break;
                case 90:
                    RichLabel view = (RichLabel) seventyTwoChangesJpanel.getScrollPaneAttribute().getViewport().getView();
                    StringBuffer buffer = new StringBuffer();
                    buffer.append("#cffffff11111111111111111#r");
                    buffer.append("#cff000022222222222222222");
                    buffer.append("#cffff0033333333333333333");
                    buffer.append("#c00000013215121651#r");
                    buffer.append("#cffffff651111235123511561321");
                    buffer.append("#cffffff3216511111132151321332");
                    buffer.append("#cffffff11111111111111111#r");
                    buffer.append("#cffffff11111111111111111");
                    buffer.append("#cffffff11111111111111111");
                    buffer.append("#cffffff11111111111111111#r");
                    buffer.append("#cff000022222222222222222");
                    buffer.append("#cffff0033333333333333333");
                    buffer.append("#c00000013215121651#r");
                    buffer.append("#cffffff651111235123511561321");
                    buffer.append("#cffffff3216511111132151321332");
                    buffer.append("#cffffff11111111111111111#r");
                    buffer.append("#cffffff11111111111111111");
                    buffer.append("#cffffff11111111111111111");
                    view = new RichLabel(buffer.toString(), UIUtils.TEXT_FONT2);
                    Dimension d = view.computeSize(130);
                    view.setSize(d);
                    view.setPreferredSize(d);
                    seventyTwoChangesJpanel.getScrollPaneAttribute().setViewportView(view);
                    // seventyTwoChangesJpanel.getScrollPaneAttribute().updateUI();
                    // seventyTwoChangesJpanel.getScrollPaneAttribute().invalidate();
                    // seventyTwoChangesJpanel.getScrollPaneAttribute().validate();
                    // seventyTwoChangesJpanel.getScrollPaneAttribute().repaint();
                    break;
                case 91:
                    DefaultTableModel tableModel = seventyTwoChangesJpanel.getTableModel();
                    tableModel.getDataVector().clear();
                    for (int i = 0; i < 20; i++) {
                        Vector<String> vectorRank = new Vector<>();
                        vectorRank.add("弟" + i);
                        vectorRank.add("弟" + i);
                        vectorRank.add("弟" + i);
                        vectorRank.add("弟" + i);
                        tableModel.addRow(vectorRank);
                    }

                    break;
                default:
                    break;
            }
        } catch (Exception e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

    }

    /** 7-17-HGC-start */
    /** 珍品10, 技能11, 神兽12, 仙器13, 配饰14, 积分15 */
//     public void changeMenuView() throws Exception {
//     for (int i = 0; i < shopOnlineJpanel.getMenuLable().length; i++) {
//     if ((i + 10) == caozuo) {
//     shopOnlineJpanel.getMenuLable()[i].setIcons(CutButtonImage.cuts("inkImg/hongmu/2/4.png"));
//     } else {
//     shopOnlineJpanel.getMenuLable()[i].setIcons(CutButtonImage.cuts("inkImg/hongmu/2/3.png"));
//     }
//     }
//     }

    // /**
    // * 多宝阁之间的面板切换菜单项修改
    // *
    // * @throws Exception
    // */
    // public void changeMenuTaoBao() throws Exception {
    // for (int i = 0; i < taobaoCourtMainJpanel.getMenuBtn().length; i++) {
    // if ((i + 1) == caozuo) {
    // taobaoCourtMainJpanel.getMenuBtn()[i].setIcons(CutButtonImage.cuts("inkImg/hongmu/2/5.png"));
    // } else {
    // taobaoCourtMainJpanel.getMenuBtn()[i].setIcons(CutButtonImage.cuts("inkImg/hongmu/2/6.png"));
    // }
    // }
    // }
    // /**
    // * 限购子面板切换
    // *
    // * @throws Exception
    // */
    // public void changeMenuBtnQuota() throws Exception {
    // for (int i = 0; i < quotaJpanel.getMenuBtn().length; i++) {
    // if ((i + 30) == caozuo) {
    // quotaJpanel.getMenuBtn()[i].setIcons(CutButtonImage.cuts("inkImg/hongmu/2/4.png"));
    // } else {
    // quotaJpanel.getMenuBtn()[i].setIcons(CutButtonImage.cuts("inkImg/hongmu/2/3.png"));
    // }
    // }
    // }
    //
    /** 7-17-HGC-end */

    /**
     * 每日登录面板切换
     *
     * @throws Exception
     */
    public void changeMenuBtnDailyLogin() throws Exception {
        for (int i = 0; i < dailyLoginJPanel.getMenuBtn().length; i++) {
            if ((i + 60) == caozuo) {
                dailyLoginJPanel.getMenuBtn()[i].setIcons(CutButtonImage.cuts("skin/8100226/button/5.png"));
                dailyLoginJPanel.getMenuStr().setText(dailyLoginJPanel.getMenuName()[i]);
            } else {
                dailyLoginJPanel.getMenuBtn()[i].setIcons(CutButtonImage.cuts("skin/8100226/button/6.png"));
            }
        }

    }

    /**
     * 人物七十二变面板切换
     *
     * @throws Exception
     */
    public void changeMenuBtnSeventyTwoChanges() throws Exception {
        for (int i = 0; i < seventyTwoChangesJpanel.getMenuBtn().length; i++) {
            if ((i + 80) == caozuo) {
                seventyTwoChangesJpanel.getMenuBtn()[i].setIcons(CutButtonImage.cuts("skin/8100226/button/4.png"));
            } else {
                seventyTwoChangesJpanel.getMenuBtn()[i].setIcons(CutButtonImage.cuts("skin/8100226/button/3.png"));
            }
        }

    }
}
